package com.app.timedTask;

import org.apache.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * CronTest
 *
 * @author nanxin.chen
 * @date 2015/11/11
 */
@Service
public class CronTest {

    public static final Logger log = Logger.getLogger(CronTest.class);

    @Scheduled(cron = "3 * * * * *")
    public void every3Seconds() {
        System.out.println("cron every5Seconds: '3 * * * * *'");
        log.info("cron every5Seconds: '3 * * * * *'");
    }
}
